<{include file="public/header.html"}>
		<div class="xinsu-section">
			<div class="my-pic">
				<span>资产</span>
			</div>
			<div class="xinsu-asset">
				<div class="xinsu-asset-title">
					<span class="xinsu-color-yellow">总资产</span>
					<p class="xinsu-color-yellow"><{number_format($result.total_assets, 2)}>元</p>
				</div>
				<div class="xinsu-asset-tab">
					<a href="/atm" class="xinsu-asset-cash">
						<i class="xinsu-icon-font xinsu-icon-cash"></i>
						<span>资金转出</span>
					</a>
					<a href="/atm/cash" class="xinsu-asset-record">
						<i class=" xinsu-icon-font xinsu-icon-record"></i>
						<span>提现记录</span>
					</a>
					<div class="xinsu-clear"></div>
				</div>
				<div class="weui-cells">
					<div class="weui-cell">
						<div class="weui-cell__bd">
							<p>净资产：</p>
						</div>
						<div class="weui-cell__ft"><{number_format($result.net_assets, 2)}></div>
					</div>
					<div class="weui-cell">
						<div class="weui-cell__bd">
							<p>可用金额：</p>
						</div>
						<div class="weui-cell__ft"><{number_format($result.amount, 2)}></div>
					</div>
					<div class="weui-cell">
						<div class="weui-cell__bd">
							<p>持仓金额：</p>
						</div>
						<div class="weui-cell__ft"><{number_format($result.bull_money, 2)}></div>
					</div>
					<div class="weui-cell">
						<div class="weui-cell__bd">
							<p>保证金：</p>
						</div>
						<div class="weui-cell__ft"><{number_format($result.finance, 2)}></div>
					</div>
					<div class="weui-cell">
						<div class="weui-cell__bd">
							<p>可提金额：</p>
						</div>
						<div class="weui-cell__ft"><{number_format($result.cash, 2)}></div>
					</div>
					<div class="weui-cell">
						<div class="weui-cell__bd">
							<p>资金盈亏：</p>
						</div>
						<div class="weui-cell__ft"><{number_format($result.finance_gain, 2)}></div>
					</div>
					<div class="weui-cell">
						<div class="weui-cell__bd">
							<p>持仓盈亏：</p>
						</div>
						<div class="weui-cell__ft" id="total_gain"><{number_format($result.total_gain, 2)}></div>
					</div>
					<div class="weui-cell">
						<div class="weui-cell__bd">
							<p>保证金率：</p>
						</div>
						<div class="weui-cell__ft"><{number_format($result.ratio, 2)}>%</div>
					</div>
				</div>
			</div>
		</div>
		<script>
			$(function(){
				get_stock();
			})
			var stock = 0;
			
			//获取最新价格
			function get_stock() {
				if (stock >= 0) {
					var url = "/user/asset";
					http_request_post(url, "", function(res) {
						var result = res.data;
						$("#total_gain").html(result.total_gain);
						
					});
				}
				stock = setTimeout("get_stock();", 1000);
			}
		</script>
<{include file="public/footer.html"}>
